from datetime import datetime

from pydantic import Field

from forward.extend.pydantic.base import BaseSchema
from forward.model.schemas.contact import ContactOutSchema
from forward.model.schemas.lucky.activity import ActivityOutSchema
from forward.model.schemas.lucky.code import CodeOutSchema
from forward.model.schemas.lucky.merchant import MerchantOutSchema
from forward.model.schemas.lucky.prize import PrizeOutSchema
from forward.model.schemas.lucky.prize_temp import PrizeTempOutSchema
from forward.model.schemas.user import UserSchema


class ActivityOrderSchema(BaseSchema):
    prize: PrizeOutSchema
    activity: ActivityOutSchema
    contact: ContactOutSchema | None = None
    merchant: MerchantOutSchema
    code: CodeOutSchema | None = None
    user: UserSchema
    prize_temp: PrizeTempOutSchema | None = None
    status: int = Field(default=0)
    remark: str | None = None


class ActivityOrderOutSchema(ActivityOrderSchema):
    created_time: datetime | None = Field(None)
    id: int


class ActivityOrderCreateSchema(ActivityOrderSchema):
    contact: ContactOutSchema | None = None


class ActivityOrderEditSchema(BaseSchema):
    pass


class AcitivitOrderUpdateSchema(ActivityOrderSchema):
    pass


class AcitivitOrderFiltersSchema(ActivityOrderSchema):
    pass
